<?php
	#GET Flags
	$qrFlag = "SELECT sttFlag AS ID, stt_Word AS NAME FROM hd_sysstatus WHERE stt_Sistema = ";

	# Busca Paises Activos
	$qrCity = "SELECT CiuNumero AS ID, CiuCiudad AS NAME FROM ciudades WHERE Prov_ID = ";
	$qrProv = "SELECT Prov_ID AS ID, Prov_Provincia AS NAME FROM cp_provincias WHERE Prov_Pais = ";
	$qrCountry = "SELECT pai_CodElite AS ID, pai_NombreUSD AS NAME FROM hd_paises WHERE pai_ActivoGiros = 1";
	$qrActiveCorrespList = "SELECT CorrNumero AS ID, CorrNombre AS NAME FROM corresponsales WHERE CorrActivo = 1";
	$qrBK = "SELECT bp_ID,bp_Name,bp_IdBanco,bp_Flag,bp_Country FROM hd_bancos WHERE bp_ID = ";
	# Busca Agencia Correspondente
	$qrOF = "SELECT CiuPais, Prov_ID, OFId, OFCorr, OFIDCiudad, OFDIreccion, OFMasDatos, OFCiudad, OFTelefonos1, OFTelefonos2, OFObs, OfHorSem, OfHorSab, OfHorDom, OfDelegacion, OfActiva
		FROM oficcorresp 
			INNER JOIN ciudades ON CiuNumero = OFIDCiudad WHERE OFId = ";

	$qrQuotage = "SELECT DISTINCT ntr_ID AS ID, ntr_Tarifa AS NAME FROM hd_tarifas
		  				INNER JOIN hd_detalletarifas ON dtr_Tarifa = ntr_ID
						WHERE dtr_Status = 1";
						
	$qrQuotageDetail = "SELECT dtr_ID AS ID, dtr_Label AS NAME FROM hd_detalletarifas
						WHERE dtr_Status = 1";
						
	$qrSysCountry = "SELECT pai_CodElite AS ID, pai_NombreESP AS NAME FROM hd_paises WHERE pai_CodElite = ".$__sys['Country'];
	$qrCurrencyActive = "SELECT miso_Cod_elite AS ID, miso_ID AS NAME FROM hd_monedasiso 
							INNER JOIN hd_detalletarifas ON dtr_MCobro = miso_Cod_elite
							WHERE dtr_Status = 1
						GROUP BY dtr_MCobro";
?>